<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Clause: chatopera::redis::Redis类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Clause
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Chatopera Language Understanding Service.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="pages.html"><span>相关页面</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="namespaces.html"><span>命名空间</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="inherits.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacechatopera.html">chatopera</a></li><li class="navelem"><b>redis</b></li><li class="navelem"><a class="el" href="classchatopera_1_1redis_1_1Redis.html">Redis</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="classchatopera_1_1redis_1_1Redis-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">chatopera::redis::Redis类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a5e7705ed4242bf2480f993085e515339"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classchatopera_1_1redis_1_1Redis.html#a5e7705ed4242bf2480f993085e515339">expire</a> (const string &amp;key, unsigned int seconds)</td></tr>
<tr class="separator:a5e7705ed4242bf2480f993085e515339"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5161b0eceef3d5c9a90fd2c9b2714969"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5161b0eceef3d5c9a90fd2c9b2714969"></a>
signed int&#160;</td><td class="memItemRight" valign="bottom"><b>ttl</b> (string key)</td></tr>
<tr class="separator:a5161b0eceef3d5c9a90fd2c9b2714969"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4842702d15a58126250516ec0f34318"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad4842702d15a58126250516ec0f34318"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>set</b> (string key, string value)</td></tr>
<tr class="separator:ad4842702d15a58126250516ec0f34318"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac84e7434482b069a21bfdce3c3319562"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac84e7434482b069a21bfdce3c3319562"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><b>get</b> (string key)</td></tr>
<tr class="separator:ac84e7434482b069a21bfdce3c3319562"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ed86f953b7ed0b8eba0a9c4578f23f2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6ed86f953b7ed0b8eba0a9c4578f23f2"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>setList</b> (const string &amp;key, const vector&lt; string &gt; &amp;value)</td></tr>
<tr class="separator:a6ed86f953b7ed0b8eba0a9c4578f23f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67647887849525a53cb244a47f86ad80"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a67647887849525a53cb244a47f86ad80"></a>
vector&lt; string &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>list</b> (const string &amp;key)</td></tr>
<tr class="separator:a67647887849525a53cb244a47f86ad80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ebeb661e283655df4b6f747bb98f0e1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2ebeb661e283655df4b6f747bb98f0e1"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>rpush</b> (const string &amp;key, const string &amp;value)</td></tr>
<tr class="separator:a2ebeb661e283655df4b6f747bb98f0e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aefb341980bf6a10926a4e7d0be71bfb7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aefb341980bf6a10926a4e7d0be71bfb7"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><b>rpop</b> (const string &amp;key)</td></tr>
<tr class="separator:aefb341980bf6a10926a4e7d0be71bfb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30287ebbbfd702f591ffff02347f394d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classchatopera_1_1redis_1_1Redis.html#a30287ebbbfd702f591ffff02347f394d">del</a> (const string &amp;key)</td></tr>
<tr class="separator:a30287ebbbfd702f591ffff02347f394d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf4bb3f9d57768d538137b86e71316c8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classchatopera_1_1redis_1_1Redis.html#acf4bb3f9d57768d538137b86e71316c8">init</a> (const string &amp;host, const int &amp;port=6379, const int &amp;db=0, const string &amp;pass=&quot;&quot;)</td></tr>
<tr class="separator:acf4bb3f9d57768d538137b86e71316c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:abe63ac184a1ed829c0a6de92d825cd8e"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classchatopera_1_1redis_1_1Redis.html">Redis</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classchatopera_1_1redis_1_1Redis.html#abe63ac184a1ed829c0a6de92d825cd8e">getInstance</a> ()</td></tr>
<tr class="separator:abe63ac184a1ed829c0a6de92d825cd8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="a30287ebbbfd702f591ffff02347f394d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void chatopera::redis::Redis::del </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>删除KEY </p>

</div>
</div>
<a class="anchor" id="a5e7705ed4242bf2480f993085e515339"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void chatopera::redis::Redis::expire </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>seconds</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置过期 </p>

</div>
</div>
<a class="anchor" id="abe63ac184a1ed829c0a6de92d825cd8e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classchatopera_1_1redis_1_1Redis.html">Redis</a> * chatopera::redis::Redis::getInstance </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>单例获得实例方法 </p>

</div>
</div>
<a class="anchor" id="acf4bb3f9d57768d538137b86e71316c8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool chatopera::redis::Redis::init </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int &amp;&#160;</td>
          <td class="paramname"><em>port</em> = <code>6379</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int &amp;&#160;</td>
          <td class="paramname"><em>db</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>pass</em> = <code>&quot;&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>初始化Redis连接 </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>src/redis/src/<a class="el" href="redis_8h_source.html">redis.h</a></li>
<li>src/redis/src/redis.cpp</li>
</ul>
</div><!-- contents -->
<address class="footer">
    <small>
        &nbsp; Copyright (c) (2019-2020) &nbsp;<a href="https://www.chatopera.com">
            北京华夏春松科技有限公司
        </a>. All Rights Reserved
        &nbsp;
    </small>
</address>